package com.bjpowernode.db.mapper;

import com.bjpowernode.db.domain.BidInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bjpowernode.db.result.BidProductResult;
import com.bjpowernode.db.result.BidUserMapping;
import com.bjpowernode.db.result.BidUserResultMapping;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author z'x'c
* @description 针对表【b_bid_info(投资记录表)】的数据库操作Mapper
* @createDate 2023-07-21 21:29:51
* @Entity com.bjpowernode.db.domain.BidInfo
*/
public interface BidInfoMapper extends BaseMapper<BidInfo> {

    //查询投资金额排行榜
    List<BidUserMapping> selectBidRank();


    //查询某个产品的最近投资记录
    List<BidUserResultMapping> selectAllByProduct(@Param("productId") Integer productId,@Param("offset") Integer offset,@Param("rows") Integer rows);


    //查询用户的投资记录



    //查询某个产品的所有投资记录
    List<BidInfo> selectBidByProduct(@Param("productId") Integer productId);

    List<BidProductResult> selectBidListByUserId(@Param("userId") Integer userId, @Param("offset") int offset, @Param("pageSize") Integer pageSize);
}




